package com.lagou.demo.controller;

import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.Security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@LagouController
@LagouRequestMapping("/security/test2")
public class SecurityTest2Controller {
    /**
     * URL: /demo/query?name=lisi
     * @param request
     * @param response
     * @param username
     * @return
     */
    @LagouRequestMapping("/test1")
    @Security({"zhangsan"})
    public void test1(HttpServletRequest request, HttpServletResponse response,String username) {
        System.out.println(username+"有访问权限");
    }

    @LagouRequestMapping("/test2")
    @Security({"lisi"})
    public void test2(HttpServletRequest request, HttpServletResponse response,String username) {
        System.out.println(username+"有访问权限");
    }
}
